﻿<%@ Page Language="C#" AutoEventWireup="true" MasterPageFile="~/MasterPage.master"
    Inherits="Product_List" EnableEventValidation="false" CodeFile="Product_List.aspx.cs" %>

 <%@ Register Src="~/UserControl/GridPager.ascx" TagName="GridPager"  TagPrefix="uc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
    <title>产品列表</title>
   
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
<asp:UpdatePanel ID="UpdatePanel" runat="server">
<ContentTemplate> 
    <div>
        <table id="wsd_inputtable">
            <tr>
                <td class="tabletitle" colspan="6">
                    <asp:Literal runat="server" Text="<%$ resources:language, lbl_Query_Condition%>"></asp:Literal>
                </td>
            </tr>
            <tr>
                <td class="tablefield">
                    <asp:Literal runat="server" Text="<%$ resources:language, lbl_Manufactory%>"></asp:Literal>
                </td>
                <td  >
                    <asp:DropDownList ID="ddlManu" runat="server" Width="130" AutoPostBack="True" OnSelectedIndexChanged="ddlManu_SelectedIndexChanged">
                    </asp:DropDownList>
                </td>
                <td class="tablefield">
                    <asp:Literal ID="Literal1" runat="server" Text="<%$ resources:language, lbl_Category%>"></asp:Literal>
                </td>
                <td>
                    <asp:DropDownList ID="ddlCategroy" runat="server" Width="130" AutoPostBack="True"
                        OnSelectedIndexChanged="ddlCategroy_SelectedIndexChanged">
                    </asp:DropDownList>
                </td>
                <td class="tablefield">
                    品牌
                </td>
                <td>
                    <asp:DropDownList ID="ddlBrand" runat="server" Width="130">
                    </asp:DropDownList>
                </td>
            </tr>
            <tr>
                <td class="tablefield">
                    <asp:Literal ID="Literal3" runat="server" Text="<%$ resources:language, lbl_Package%>"></asp:Literal>
                </td>
                <td>
                    <asp:DropDownList ID="ddlForm" runat="server" Width="130">
                    </asp:DropDownList>
                </td>
                <td class="tablefield">
                    <asp:Literal ID="Literal4" runat="server" Text="<%$ resources:language, lbl_Active%>"></asp:Literal>
                </td>
                <td >
                    <asp:DropDownList ID="ddlValid" runat="server" Width="130">
                        <asp:ListItem Value="-1" Text="<%$ resources:language, ddl_All%>"></asp:ListItem>
                        <asp:ListItem Value="1" Text="<%$ resources:language, ddl_Active%>" Selected="True"></asp:ListItem>
                        <asp:ListItem Value="0" Text="<%$ resources:language, ddl_Inactive%>"></asp:ListItem>
                    </asp:DropDownList>
                </td>
                <td class="tablefield">
                    <asp:Literal ID="Literal5" runat="server" Text="<%$ resources:language, lbl_ProductName%>"></asp:Literal>
                </td>
                <td>
                    <asp:TextBox runat="server" ID="txtCustomer" class="default" MaxLength="20" Width="130px"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td class="tablefield">
                </td>
                 
                <td class="buttonarea" colspan="5">
                    &nbsp;<asp:Button ID="btnQuery" runat="server" class="wsd_button2" Text="<%$ resources:language, btn_Query%>" OnClick="btnQuery_Click" />
                    &nbsp;&nbsp;
                    <input type="button" runat="server" class="wsd_button2" size="47" value="<%$ resources:language, btn_Reset%>" name="reset" onclick="clearForm('ASPNETform')" />
                </td>
            </tr>
        </table>
        <br />

        <table id="wsd_listtable" width="100%">
            <tr>
                <td style="width: 100%">
                    <asp:GridView Width="100%" ID="GridView1" runat="server" AutoGenerateColumns="False"
                        EmptyDataText="<%$ resources:language, lbl_Empty%>" EmptyDataRowStyle-Font-Bold="true" EmptyDataRowStyle-HorizontalAlign="Center" BorderWidth="0"
                        OnRowDataBound="Grid_RowDataBound" EnableEmptyContentRender="true" AllowPaging="True"
                        PageSize="10" OnPageIndexChanging="GridView1_PageIndexChanging">
                        <HeaderStyle CssClass="titlist" />
                        <EmptyDataRowStyle HorizontalAlign="Center" Font-Bold="True"></EmptyDataRowStyle>
                        <Columns>
                            <asp:TemplateField ItemStyle-HorizontalAlign="center" HeaderStyle-HorizontalAlign="center">
                                <ItemTemplate>
                                    <image  src='<%# "../../SMALLIMAGE.aspx?H=80&W=80&ID=" + Eval("PHOTO_ID").ToString()  %>' ></image>
                                     </ItemTemplate>
                                <HeaderStyle HorizontalAlign="Center"></HeaderStyle>
                                <ItemStyle HorizontalAlign="Center"></ItemStyle>
                            </asp:TemplateField>
                            <asp:HyperLinkField  HeaderText="<%$ resources:language, lbl_ProductCode%>" DataNavigateUrlFields="ID" DataNavigateUrlFormatString="Product_detail.aspx?id={0}"
                                DataTextField="ProductCode" ControlStyle-Font-Underline="false"  >
                                <ControlStyle Font-Underline="False"></ControlStyle>
                            </asp:HyperLinkField>
                            <asp:BoundField DataField="FORMNAME" HeaderText="系列" />
                            <asp:HyperLinkField HeaderText="<%$ resources:language, lbl_ProductName%>" DataNavigateUrlFields="ID" DataNavigateUrlFormatString="Product_detail.aspx?id={0}"
                                DataTextField="ProductName" ControlStyle-Font-Underline="false">
                                <ControlStyle Font-Underline="False"></ControlStyle>
                            </asp:HyperLinkField>
                            <asp:BoundField DataField="CASE_PRICE" HeaderText="箱(价)" DataFormatString="{0:N2}" />
                            <asp:BoundField DataField="PIECE_PRICE" HeaderText="支(价)" DataFormatString="{0:N2}" />
                            <asp:BoundField DataField="DENOMINATOR" HeaderText="箱/支"  />
                            <asp:TemplateField HeaderText="<%$ resources:language, lbl_Active%>" ItemStyle-HorizontalAlign="center" HeaderStyle-HorizontalAlign="center">
                                <ItemTemplate>
                                    <b>
                                        <%# (bool)Eval("ACTIVE") ? "<font size='3' color='green'>√</font>" : "<font size='3' color='red'>×</font>"%></b>
                                </ItemTemplate>
                                <HeaderStyle HorizontalAlign="Center"></HeaderStyle>
                                <ItemStyle HorizontalAlign="Center"></ItemStyle>
                            </asp:TemplateField>
                        </Columns>
                        <PagerSettings Visible="false" FirstPageText="<%$ resources:language, lbl_First_Page%>" LastPageText="<%$ resources:language, lbl_Last_Page%>" Mode="NumericFirstLast" PageButtonCount="30" />
                        <RowStyle CssClass="evenline" />
                        <AlternatingRowStyle CssClass="oddline" />
                    </asp:GridView>
                    <uc1:GridPager ID="GridPager1" runat="server" Visible="false" />
                </td>
            </tr>
        </table>
        <br />
        <table id="wsd_inputtable">
            <tr>
                <td width="100%" class="tabletitle">
                    <asp:Literal ID="Literal7" runat="server" Text="<%$ resources:language, lbl_Operation_Area%>"></asp:Literal>
                </td>
            </tr>
            <tr>
                <td class="buttonarea">
                    <input  type="button" OnClick="location.href='product_detail.aspx';" class="wsd_button2" value="新增"  />
                    &nbsp;<asp:Button ID="Button2" runat="server" class="wsd_button2" Visible="false" Text="<%$ resources:language, btn_Export%>"
                        OnClick="Button2_Click" />
                </td>
            </tr>
        </table>
    </div></ContentTemplate>
    </asp:UpdatePanel>
</asp:Content>
